main(int n){char c[100]; for(gets(&n);~scanf("%s",c);){int l=strlen(c)/2;for(n=0;n<l+1;)putchar(c[n++*2]);for(n=0;n<l;)putchar(c[n++*2+1]);puts("");}}
